package day03;

public class IfElseIfDemo {
    public static void main(String[] args) {
      // int a=900,b=8000;
      /* int max=a>b?a:b;
        System.out.println(max);
        System.out.println(b%a);
        //做好基础工作多学习
        //完整做完公司提供项目
        //带领项目小组，完成公司基本项目


        b--;
        System.out.println(a++>900);
        System.out.println(a);
        */
        int a=98,b=67;
        int max=a>b?a:b;
        System.out.println(max);
        int year=2004;
        if((year % 4==0&&year %100!=0)||year%400==0){
            System.out.println(year+"年是闰年");
        }else {
            System.out.println(year+"年不是闰年");
        }








        /*
        int year=1997;
        if  ((year%4==0 && year%100!=0)||( year%400==0)){
            System.out.println(year+"年是闰年");
        }else {
            System.out.println(year+"年不是闰年");
        }


        int year1=2000;
        if((year1%4==0 && year1%100!=0)||year1%400==0){
            System.out.println(year1+"年是闰年");
        }else {
            System.out.println(year1+"年不是闰年");
        }

        int a=86;
        if(a>=0&&a<=100){
            if(a>=90){
                System.out.println("成绩为：A");

            }else if(a>=80) {
                System.out.println("成绩为：B");
            }else if(a>=60){
                System.out.println("成绩为:C");
            }else {
                System.out.println("成绩为:D");
            }
        }else{
            System.out.println("成绩不合法");
        }

        */



















     /*   int a=62,b=445;
        int max=a>b?a:b;
        System.out.println(max);
        if (a>b){
            max=a;
        }else {
            max=b;
        }
        System.out.println(max);

        int price=300;
        if(price>=500){
            price*=0.8;
        }else if(price>=300) {
            price*=0.9;
        }else if(price>=100){
            price*=0.95;
        }
        System.out.println("最终消费金额为"+price);
        int score=-8;
        if(score>0&& score<100){
            System.out.println("成绩合法");
        }else{
            System.out.println("成绩不合法");
        }

         */





       /* int a=10,b;
        if (a>0){
            b=1;
        }else {
            b=0;
        }
        System.out.println(b);
        int c=56,d=89;
        int max =c>d?c:d;
        System.out.println("max="+max);

        */

      /* int age = 22;
       String name = "姜志可";
        System.out.println("我的年纪是"+age+"岁，我叫"+name);
        System.out.println("age="+age);
        System.out.println(10+12+16+"");
        System.out.println("12"+11+10);
        System.out.println(10+10+10+10+"");

         int a=10,b=14,c=17,d=3;
        int e=0,f=10,g=10,t=10,it=10,q=10;
        e+=a;
        c-=7;
        g+=10;
        q*=d;
        it%=d;
        System.out.println(e);//10
        System.out.println(c);//10
        System.out.println(g);//20
        System.out.println(q);//30
        System.out.println(it);//1

        */

     /*   boolean e=a>b&&a>c;
        System.out.println(a+b>c && b==c);//false
        System.out.println(b<c || a>b);//true
        System.out.println(d+c>90 || a>c);//false
        System.out.println(!(a+c>d));//false
        System.out.println(e);//false
        boolean f= a++>17;//
        System.out.println(f);//false
        System.out.println(a);//11
        boolean g=a>b && ++a>c;
        System.out.println(g);//false
        System.out.println(a);//11

        System.out.println(a>b);//false
        System.out.println(b>c);//false
        System.out.println(c<d);//true
        System.out.println(a<=c);//true
        System.out.println(c>=a);//true
        System.out.println(a+1==b);//false
        System.out.println(a+b>=c);//true

        */

       /* int a=8,b=3,c=7,d=14;
        System.out.println(a%b);
        System.out.println(a%c);
        int a1=12,a2=15;
        a1++;
        a2--;
        System.out.println(a1--);
        System.out.println(++a2);

        */









      /*  double price=300;
        if(price>=2000){
            price*=0.5;
        }else if (price>=1000){
            price*=0.6;
        }else if (price>=500){
            price*=0.8;
        }else{
            price*=0.9;
        }
        System.out.println(price);

       */

    }
}
